package cn.com.nes.site.service.product.impl;

import cn.com.nes.site.entity.vo.product.SaveProductSeriesAndEnergyVO;
import cn.com.nes.site.service.product.AsyncSaveProductSeriesService;
import cn.com.nes.site.service.product.ProductSeriesAndEnergyService;
import cn.com.nes.site.service.product.bo.SaveProductSeriesAndEnergyBO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class AsyncSaveProductSeriesImpl implements AsyncSaveProductSeriesService {

    @Resource
    private ProductSeriesAndEnergyService productSeriesAndEnergyService;

    @Override
    public void saveProductSeries(SaveProductSeriesAndEnergyBO bo) {
        SaveProductSeriesAndEnergyVO vo = new SaveProductSeriesAndEnergyVO();
        BeanUtils.copyProperties(bo, vo);
        vo.setOperateUserCompanyId(bo.getCompanyId());
        productSeriesAndEnergyService.saveProductSeriesAndEnergy(vo);
    }
}
